/**
 * 运单管理
 * @author xiaoxujs
 */

import { basicIp, newHttpService } from "../../../api/http"
import { ITlplTCarCarListParams, ITlplTCarSubmitTruckingOrderParams, ITlplTPlanAddParams, ITlplTPlanPageListParams, ITlplTPlanPlanCancellationParams, ITlplTPlanSupplementParams, ITlplTReportListParams } from "../../../type/WaybillManagement/api";

// 运单管理列表接口
export const postTlplTPlanPageList = (data: ITlplTPlanPageListParams) => {
    const url = basicIp + '/tlpl/t-plan/pageList';
    return newHttpService.postData(url, data)
}
// 运单管理添加接口
export const postTlplTPlanAdd = (data: ITlplTPlanAddParams) => {
    const url = basicIp + '/tlpl/t-plan/add';
    return newHttpService.postData(url, data)
}
// 删除发运单接口
export const getTlplTPlanDelete = (data: { planId: string }) => {
    const url = basicIp + '/tlpl/t-plan/delete';
    return newHttpService.getData(url, data)
}
// 作废发运单接口
export const getTlplTPlanPlanCancellation = (data: ITlplTPlanPlanCancellationParams) => {
    const url = basicIp + '/tlpl/t-plan/planCancellation';
    return newHttpService.getData(url, data)
}
// 运单列表 - 暂停发运单接口
export const getTlplTPlanPlanStop = (data: { planId: string }) => {
    const url = basicIp + '/tlpl/t-plan/planStop';
    return newHttpService.getData(url, data)
}
// 运单列表 - 开始发运单接口
export const getTlplTPlanPlanStart = (data: { planId: string }) => {
    const url = basicIp + '/tlpl/t-plan/planStart';
    return newHttpService.getData(url, data)
}
// 运单列表 - 补充发运量
export const getTlplTPlanSupplement = (data: ITlplTPlanSupplementParams) => {
    const url = basicIp + '/tlpl/t-plan/supplement';
    return newHttpService.getData(url, data)
}
// 运单管理 - 导入车辆
export const postTlplTCarSubmitTruckingOrder = (data: ITlplTCarSubmitTruckingOrderParams) => {
    const url = basicIp + '/tlpl/t-car/submitTruckingOrder';
    return newHttpService.postData(url, data)
}
// 运单管理 - 车辆列表
export const getTlplTCarCarList = (data: ITlplTCarCarListParams) => {
    const url = basicIp + '/tlpl/t-car/carList';
    return newHttpService.getData(url, data)
}
// 运单管理 - 车辆列表 - 移除车辆
export const getTlplTCarUnbind = (data:{carId: string[]}) => {
    const url = basicIp + '/tlpl/t-car/unbind';
    return newHttpService.getData(url, data)
}
// 运单管理——装车数据——发运分析
export const getTlplTReportAnalyse = (data: { planId: string }) => {
    const url = basicIp + '/tlpl/t-report/analyse';
    return newHttpService.getData(url, data)
}
// 运单管理 - 装车数据 - 车辆运输明细
export const getTlplTReportList = (data: ITlplTReportListParams) => {
    const url = basicIp + '/tlpl/t-report/list';
    return newHttpService.getData(url, data)
}

// 车辆管理 - 新增车辆 - 模板下载url
export const urlPlanCarDownloadTemplateGet = basicIp + '/tlpl/t-car/downloadTemplate';

